package com.hc.springBootDemo.controller;

import java.util.Map;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

@Controller 
public class HelloController {

	
	@RequestMapping({"/","index.html"})
	public String index() {
		return "login";
	}
	
	@RequestMapping("/login.do")
	public String login(String name,String pwd,Map<String,Object> map){
		int a = 0;
		if("admin".equals(name) && "123".equals(pwd)) {
			map.put("username", name);
		return "index";
		}
		return "login";
	}
		
}
